﻿using System;

namespace msilgc.runtime {
    internal static class CSharpCompilerHelperFactory {
        public static ICSharpCompilerHelper Create() {
            switch (Environment.OSVersion.Platform) {
                case PlatformID.Win32S:
                case PlatformID.Win32Windows:
                case PlatformID.Win32NT:
                    return new MSCsharpCompilerHelper();
                case PlatformID.Unix:
                case PlatformID.MacOSX:
                    return new UnixCsharpCompilerHelper();
                default:
                    throw new SystemException("platform is not supported");
            }
        }
    }
}